-- GENERATED SPELL FOR [Maxnar the Ashmaw] --


function spell0_21389(pUnit, Event) --@Cleave,n/a--
pUnit:FullCastSpellOnTarget(15284,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21389', 565, 1)
end

function spell1_21389(pUnit, Event) --@Flame Breath,n/a--
pUnit:FullCastSpellOnTarget(37638,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21389', 2000, 1)
end

function spell2_21389(pUnit, Event) --@Mortal Strike,n/a--
pUnit:FullCastSpellOnTarget(32736,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21389', 5313, 1)
end

function Sorts_21389(pUnit, Event)
local choix_sorts_21389 = math.random(0, 2)
if choix_sorts_21389 == 0 then
pUnit:RegisterEvent('spell0_21389', 1, 1)
end
if choix_sorts_21389 == 1 then
pUnit:RegisterEvent('spell1_21389', 1, 1)
end
if choix_sorts_21389 == 2 then
pUnit:RegisterEvent('spell2_21389', 1, 1)
end
end

function mob21389_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_21389', math.random(1500, 3000), 1)
end

function mob21389_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21389_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21389_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(21389, 1, 'mob21389_Action')
RegisterUnitEvent(21389, 2, 'mob21389_Leave')
RegisterUnitEvent(21389, 3, 'mob21389_Kill')
RegisterUnitEvent(21389, 4, 'mob21389_Die')
